<!DOCTYPE html>
<html>

	<head>
		<meta charset="UTF-8">
		<link rel="stylesheet" type="text/css" href="css/common.css"/>
		<title></title>
	</head>

	<body>
		<div class="login">
			<div class="login_content">
				<!--<img src="img/login_logo.jpg" />-->
				<div class="login_input user">
					<p class="fl"></p><span class="fl">账号</span><input  class="fl" type="text" name="" id="user" value="" class="" onBlur="this.value=ignoreSpaces(this.value);" /><span class="fl">@gdinsight.com</span>
					<div class="clear"></div>
				</div>
				<div class="login_input">
					<p class="fl"></p><span class="fl">密码</span><input  class="fl" type="password" name="" id="password" value="" class="" />
					<div class="clear"></div>
				</div>
				<input class="login_btn" type="submit" name="" id="" value="登录" />
			</div>
			<div class="bottom">
				<img src="img/copy.png" class="fl"/>
				<p class="fl">广东因赛品牌营销集团股份有限公司版权所有</p>
				<div class="clear"></div>
			</div>
		</div>
		
		
		<script src="js/jquery-2.1.0.js" type="text/javascript" charset="utf-8"></script>
		<script type="text/javascript">
			
		
			$(document).ready(function() {
				mainliWidth();
				$(window).resize(function() {
					mainliWidth();
				});

				function mainliWidth() {
					var hei = document.documentElement.clientHeight;
					var loginhei = hei*0.7;
					var loginpadhei=hei*0.3;
					$(".login").css("padding-top",loginpadhei)
					$(".login").height(loginhei);
				}
			});
			
			//登录动作
			$(".login_btn").click(function(){
				var user = $("#user").val();
				var passwordval = $("#password").val();
				$.ajax({
					type:"post",
					url:"./app/index.php?m=public&a=login",
					data:{'u_account':user,'u_password':passwordval,},
					async:true,
					success:function(ret){
						var isstatus = ret.status;
						var info = ret.info;
						if(isstatus == true){
							window.history.go(-1);
						}else{
							alert(info);
						}
					}
				});
			})
			
			$("body").keydown(function() {
			    if (event.keyCode == "13") {//keyCode=13是回车键
			        $('.login_btn').click();
			    }
			});
			
			
			//忘记密码
			
			//去除空格键
			function ignoreSpaces(string) {
				var temp = "";
				string = '' + string;
				splitstring = string.split(" ");
				for(i = 0; i < splitstring.length; i++)
				temp += splitstring[i];
				return temp;
			}
		</script>
	</body>
</html>